package com.fanqiechaodan.proxy.jdkproxy.service.impl;

import com.fanqiechaodan.proxy.jdkproxy.entity.User;
import com.fanqiechaodan.proxy.jdkproxy.service.UserService;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fanqiechaodan
 * @Classname UserServiceImpl
 * @Description
 */
public class UserServiceImpl implements UserService {


    /**
     * 登录
     *
     * @param username
     * @param password
     */
    @Override
    public void login(String username, String password) throws InterruptedException {
        // 模拟业务处理
        Thread.sleep(1000);
    }

    /**
     * 删除用户
     *
     * @param userId
     */
    @Override
    public void deleteUser(String userId) throws InterruptedException {
        // 模拟业务处理
        Thread.sleep(800);
    }

    /**
     * 获取用户信息
     *
     * @return
     */
    @Override
    public List<User> selectUser() throws InterruptedException {
        // 模拟业务处理
        Thread.sleep(700);
        return new ArrayList<>();
    }
}
